<link
	href="${rc.getContextPath()}/manage/css/dwzCustomCss/dwz.custom.css?v=${ver}"
	rel="stylesheet" type="text/css">
<script
	src="${rc.getContextPath()}/manage/js/dwzCustomJs/dwz.custom.advancedquery.js?v=${ver}"
	type="text/javascript"></script>
<#include "/common/pagerForm.html">
<form rel="pagerForm" method="post" action=""
	onsubmit="return navTabSearch(this)">
	<div class="pageHeader">
		<div class="searchBar">
			<ul class="searchContent">
				<li><label> <@label key='businessType.C,colon'>业务类型：
						</@label></label> <input type="text" name="fuzzyBusinessType"
					value="${condition.fuzzyBusinessType!''}" /></li>
				<li><label> <@label
						key='businessTypeText.C,colon'>业务类型描述： </@label></label> <input
					type="text" name="fuzzyBusinessTypeText"
					value="${condition.fuzzyBusinessTypeText!''}" /></li>

				<li class="query">
					<div class="buttonActive">
						<div class="buttonContent">
							<button type="submit" name="btnQuery"><@label
								key="query.B">查询</@label></button>
						</div>
					</div>
				</li>
			</ul>

		</div>
	</div>
</form>

<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
		<@buttonRight menuCode="BUSINESSTYPE_ADD" labelKey="add.B" defalutName="新增">
			<li><a class="add" rel="businessType" target="dialog"
				mask="true" width="635" height="200"
				href="${rc.getContextPath()}/manage/workflowBusiness/toAddBusinessType?navTabId=${navTabId!''}"><span><@label
						key="add.B">新增</@label></span></a></li>
         </@buttonRight>
         <@buttonRight menuCode="BUSINESSTYPE_EDIT" labelKey="edit.B" defalutName="编辑">
			<li><a class="edit" rel="businessType" target="dialog"
				mask="true" width="835" height="650"
				href="${rc.getContextPath()}/manage/workflowBusiness/toEditBusinessType?businessType={businessType_id}&navTabId=${navTabId!''}"><span><@label
						key="edit.B">编辑</@label></span></a></li>
		  </@buttonRight>
		  <@buttonRight menuCode="BUSINESSTYPE_VIEW" labelKey="view.B" defalutName="详情">
			<li><a class="icon" rel="businessType" target="dialog"
				mask="true" width="835" height="650"
				href="${rc.getContextPath()}/manage/workflowBusiness/viewBusinessType?businessType={businessType_id}&navTabId=${navTabId!''}"><span><@label
						key="view.B">详情</@label></span></a></li>
		  </@buttonRight>
		  <@buttonRight menuCode="BUSINESSTYPE_DEL" labelKey="delete.B" defalutName="删除">
			<li><a class="delete" target="selectedTodo" posttype="string"
				rel="businessType_ids"
				href="${rc.getContextPath()}/manage/workflowBusiness/deleteBusinessTypeBatch?navTabId=${navTabId!''}"
				callback="batchjobAjaxDone"
				title="<@label key='confirmDelbusinessType.M'>确认要删除选中的业务类型吗？</@label>"><span><@label
						key="delete.B">删除</@label></span></a></li>
			</@buttonRight>
			<@buttonRight menuCode="BUSINESSTYPE_CREATETABLE" labelKey="businessTableCreateOrUpdate.B" defalutName="生成/更新表结构">
			<li><a class="test"  target="ajaxToDo"  name='btnToCreateOrUpdateTable' 
			     href="${rc.getContextPath()}/manage/workflowBusiness/doCreateOrUpdateBusinessTable?businessType={businessType_id}"
                title="<@label key='confirmCreateOrUpdateBusinessTable.M'>确认要根据业务类型配置生成/更新表吗？</@label>"><span><@label
                        key="businessTableCreateOrUpdate.B">生成/更新表结构</@label></span></a></li>	
             </@buttonRight>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="134">
		<thead>
			<tr>

				<th width="22"><input type="checkbox" group="businessType_ids"
					class="checkboxCtrl"></th>
				<th width="40"><@label key="serialNumber.C">序号</@label></th>
				<th width="80" orderField="businessType"<#if
					(page.orderField?? && page.orderField
					=="businessType")>class="${page.orderDirection!''}"</#if>><@label
					key='businessType.C'>业务类型</@label></th>
				<th width="80" orderField="businessTypeText"<#if
					(page.orderField?? && page.orderField
					=="businessTypeText")>class="${page.orderDirection!''}"</#if>><@label
					key='businessTypeText.C'>业务类型描述</@label></th>
				<th width="80" orderField="sequenceCode"<#if
					(page.orderField?? && page.orderField
					=="sequenceCode")>class="${page.orderDirection!''}"</#if>><@label
					key='sequenceCode.C'>序列编号</@label></th>
				<th width="80" orderField="numberRuleCode"<#if
					(page.orderField?? && page.orderField
					=="numberRuleCode")>class="${page.orderDirection!''}"</#if>><@label
					key='numberRuleCode.C'>业务编号规则</@label></th>
				<th width="80" orderField="createUser"<#if (page.orderField??
					&& page.orderField
					=="createUser")>class="${page.orderDirection!''}"</#if>><@label
					key='createUser.C'>创建人</@label></th>
				<th width="80" orderField="createDateTime"<#if
					(page.orderField?? && page.orderField
					=="createDateTime")>class="${page.orderDirection!''}"</#if>><@label
					key='createDateTime.C'>创建时间</@label></th>
				<th width="80" orderField="modifyDateTime"<#if
					(page.orderField?? && page.orderField
					=="modifyDateTime")>class="${page.orderDirection!''}"</#if>><@label
					key='modifyDateTime.C'>修改时间</@label></th>
				<th width="80" orderField="modifyUser"<#if (page.orderField??
					&& page.orderField
					=="modifyUser")>class="${page.orderDirection!''}"</#if>><@label
					key='modifyUser.C'>修改人</@label></th>
			</tr>
		</thead>
		<tbody>
			<#if page??><#if (page.data?size>0)> <#list page.data as
			businessType>
			<tr target="businessType_id" rel="${businessType.businessType!''}" tableCreateFlag=${businessType.tableCreateFlag}>
				<td><input name="businessType_ids"
					value="${businessType.businessType!''}" type="checkbox"></td>
				<td>${page.startRow + businessType_index}</td>
				<td>${businessType.businessType!}</td>
				<td>${businessType.businessTypeText!}</td>
				<td>${businessType.sequenceCode!}</td>
				<td>${businessType.numberRuleCode!}</td>
				<td>${businessType.createUser!}</td>
				<td>${businessType.createDateTime!?string("yyyy-MM-dd
					HH:mm:ss")?if_exists}</td>
				<td>${businessType.modifyDateTime!?string("yyyy-MM-dd
					HH:mm:ss")?if_exists}</td>
				<td>${businessType.modifyUser!}</td>
			</tr>
			</#list> <#else>
			<tr target="businessType_id">
				<td colspan="20" class="noData">======<@label
					key='noListData.C'>列表无数据</@label>=====</font>
				</td>
			</tr>
			</#if> <#else>
			<tr target="businessType_id">
				<td colspan="20" class="noData">======<@label
					key='noListData.C'>列表无数据</@label>=====</font>
				</td>
			</tr>
			</#if>
		</tbody>
	</table>
	<#include "/common/panelBar.html">
</div>
<script type="text/javascript">
(function($){
	var page = DWZ.context();
	
	$("a[name='btnToCreateOrUpdateTable'",page).attr("preevent",function(){
		return function(){
			var page = DWZ.context();
// 		    if("1" === $("table tr[class='selected']",page).attr("tableCreateFlag")){
// 		    	alertMsg.error("<@label key='businessTableAlreadyCreate.M'>该业务类型表已经创建！</@label>");
// 	            return false;
// 	        }
		    
		    return true;
		}
	})
	
})(jQuery);
</script>
